package com.kehutong.charge.util.enums;

import org.coraframework.util.HashID;

/**
 * @program: kht
 * @description: 仪表类型
 * @author: joneron
 * @create: 2021/7/5
 **/
public enum MeterTypeEnum implements HashID {

    METER_WATT("1", "电表"),
    METER_WATER("2", "水表"),
    METER_GAS("3", "天然气表")
    ;

    private final String id;
    private final String desc ;

    private MeterTypeEnum(String id, String desc) {
        this.id = id;
        this.desc = desc ;
    }


    public static MeterTypeEnum getEnums(String desc){
        for (MeterTypeEnum value : MeterTypeEnum.values()) {
            if(value.desc.equals(desc)){
                return value;
            }
        }
        return null;
    }



    @Override
    public String getId() {
        return id;
    }

    @Override
    public String getDesc() {
        return desc;
    }
}
